package org.gridgain.internal.h2.vector.tx;

import org.gridgain.internal.h2.value.VersionedValue;

public class MyVersionedValueCommitted extends VersionedValue {

    public final Object value;

    public MyVersionedValueCommitted(Object value)
    {
        this.value = value;
    }

    static VersionedValue getInstance(Object value) {
        return value instanceof VersionedValue ? (VersionedValue) value : new MyVersionedValueCommitted(value);
    }

    @Override
    public Object getCurrentValue() {
        return value;
    }

    @Override
    public Object getCommittedValue() {
        return value;
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }
}
